import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'
import HomeView from '../views/HomeView.vue'
// import CanteenList from '@/views/CanteenList.vue';
import CommentRoom from '@/views/CommentRoom.vue';
import DishManagement from '@/views/DishManagement.vue';
import FoodDatas from '@/views/FoodDatas.vue';
import ShopMann from '@/views/ShopMann.vue';
import AllOrders from '@/views/AllOrders.vue';
import RcmdFoods from '@/views/RcmdFoods.vue'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    name: 'home',
    // component: HomeView
    component: HomeView
  },
  {
    path: '/about',
    name: 'about',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  },
  // { path: '/', component: CanteenList },
  { path: '/comment-room', component: CommentRoom },
  { path: '/dish-management', component: DishManagement },
  { path: '/food-datas', component: FoodDatas},
  { path: '/all-orders', component: AllOrders}, 
  { path: '/shop-mann', component: ShopMann},
  { path: '/rcmd-foods', component: RcmdFoods }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
